import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
    /*    mode: 'history',*/
    routes: [
        {
            path: '/',
            redirect: '/dashboard'
        },
        {
            path: '/',
            component: resolve => require(['../components/common/Home.vue'], resolve),
            meta: {title: '自述文件'},
            children: [
                /*首页*/
                {
                    path: '/dashboard',
                    component: resolve => require(['../components/page/Dashboard.vue'], resolve),
                    meta: {title: '首页'}
                },
                {
                    path: '/hospital',
                    component: resolve => require(['../components/page/hospital.vue'], resolve),
                    meta: {title: '医院',}
                },
                {
                    path: '/doctor',
                    component: resolve => require(['../components/page/doctor.vue'], resolve),
                    meta: {title: '医生',}
                },
                {
                    path: '/segmentation',
                    component: resolve => require(['../components/page/segmentation.vue'], resolve),
                    meta: {title: '移植吧分词',}
                },
                {
                    path: '/keywordSearch',
                    component: resolve => require(['../components/page/keywordSearch.vue'], resolve),
                    meta: {title: '移植吧',}
                },
                {
                    path: '/distribution',
                    component: resolve => require(['../components/page/distribution.vue'], resolve),
                    meta: {title: '按疾病搜索',}
                },
                {
                    path: '/wanfang',
                    component: resolve => require(['../components/page/wanfang.vue'], resolve),
                    meta: {title: '万方',}
                },
                {
                    path: '/pubmed',
                    component: resolve => require(['../components/page/pubmed.vue'], resolve),
                    meta: {title: 'Pubmed',}
                },
                {
                    path: '/BaiduTieba',
                    component: resolve => require(['../components/page/BaiduTieba.vue'], resolve),
                    meta: {title: '百度贴吧-移植吧'}
                },
                {
                    path: '/drag',
                    component: resolve => require(['../components/page/DragList.vue'], resolve),
                    meta: {title: '资讯统计',}
                },
                {
                    path: '/govermentInfo',
                    component: resolve => require(['../components/page/govermentInfo.vue'], resolve),
                    meta: {title: '政府资讯管理'}
                },
                {
                    path: '/biddingInfo',
                    component: resolve => require(['../components/page/biddingInfo.vue'], resolve),
                    meta: {title: '招标信息管理'}
                },
                {
                    path: '/chattingRobot',
                    component: resolve => require(['../components/page/chattingRobot.vue'], resolve),
                    meta: {title: '聊天机器人'}
                },
                {
                    path: '/tabs',
                    component: resolve => require(['../components/page/Tabs.vue'], resolve),
                    meta: {title: 'tab选项卡',}
                },
                {
                    /*添加permission: true可以添加权限*/
                    path: '/permission',
                    component: resolve => require(['../components/page/Permission.vue'], resolve),
                    meta: {title: '权限测试', permission: true}
                },
                {
                    path: '/ConferenceOn',
                    component: resolve => require(['../components/page/ConferenceOn.vue'], resolve),
                    meta: {title: '会务通'}
                }
            ]
        },
        {
            path: '/login',
            component: resolve => require(['../components/page/Login.vue'], resolve)
        },
        {
            path: '/404',
            component: resolve => require(['../components/page/404.vue'], resolve)
        },
        {
            path: '/403',
            component: resolve => require(['../components/page/403.vue'], resolve)
        },
        {
            path: '*',
            redirect: '/404'
        },
        {
            path: '/search',
            component: resolve => require(['../components/search/search.vue'], resolve),
            meta: {title: '搜索引擎',}
        },
    ]
})
